package com.zygh.interactiveplatform.module.controller;


import com.zygh.interactiveplatform.common.anno.PcLog;
import com.zygh.interactiveplatform.common.constant.SwaggerTagConst;
import com.zygh.interactiveplatform.common.domain.ResponseDTO;
import com.zygh.interactiveplatform.module.service.CarstatisticsService;
import com.zygh.interactiveplatform.module.service.TRFFAPPService;
import com.zygh.interactiveplatform.module.service.V1RestrictionAlgorithmServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author lee
 * @since 2021-02-01
 */
@RestController
@RequestMapping("/carstatistics")
@Api(tags = {SwaggerTagConst.Admin.MANAGER_CARSTATISTICS})
public class CarstatisticsController {
    @Autowired
    private CarstatisticsService carstatisticsService;
    @Resource
    private V1RestrictionAlgorithmServiceImpl v1RestrictionAlgorithmService;
    @Resource
    private TRFFAPPService trffappService;

    @ApiOperation(value = "查询车辆实时统计定时统计", notes = "查询车辆实时统计定时统计")
    @GetMapping("findCarstatisticsLast")
    @PcLog(logType = "1", module = SwaggerTagConst.Admin.MANAGER_CARSTATISTICS, content = "查询车辆实时统计定时统计")
    public ResponseDTO findCarstatisticsLast() {
        return carstatisticsService.findCarstatisticsLast();
    }

    @ApiOperation(value = "查询今日违法车辆", notes = "查询今日违法车辆")
    @GetMapping("illegalVehicle")
    @PcLog(logType = "1", module = SwaggerTagConst.Admin.MANAGER_CARSTATISTICS, content = "查询今日违法车辆")
    public ResponseDTO illegalVehicle() {
        return v1RestrictionAlgorithmService.illegalVehicle();
    }



}
